package cn.slt.service.impl;

import java.util.HashMap;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.slt.domian.users;
import cn.slt.mapper.MD_objContMapper;
import cn.slt.mapper.usersMapper;
import cn.slt.service.usersService;

@Service
@Transactional
public class userServiceImpl implements usersService {
	@Autowired
	private usersMapper mapper;

	public users getall(users user) {
		return mapper.getall(user);
	}

	public boolean updatestate1(String username) {
		return mapper.updatestate1(username);
	}

	public boolean updatestate0(users user) {
		return mapper.updatestate0(user);
	}

	public boolean updateusers(users user) {
		return mapper.updateusers(user);
	}

	@Override
	public boolean deleteUsers(String location, String owner) {
		// TODO Auto-generated method stub
		Map<String, String> map=new HashMap<String, String>();
		map.put("location", location);
		map.put("owner", owner);
		return mapper.deleteUsers(map);
	}
}
